/*
 * @Author: wuyue
 * @Date: 2023-02-20 21:05:50
 * @LastEditTime: 2023-03-14 14:32:14
 * @LastEditors: wuyue
 * @Descripttion: 项目计量设备台账API
 * @version: 
 */
import request from '@/utils/request'
import { faceProducerApiUrl } from '@/api/config'
export function getList(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/getPageMdProjectInfo`,
        method: 'post',
        data
    })
}
// 获取统计数据
export function getStatisticsData(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/getCountByMdProjectStatus`,
        method: 'post',
        data
    })
}
// 新增
export function addItem(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/insertMdProjectInfo`,
        method: 'post',
        data
    })
}

// 详情
 export function detailsItem(params) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/getMdProjectInfoById`,
        method: 'get',
        params
    })
}

// 编辑
export function editItem(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/editMdProjectInfo`,
        method: 'post',
        data
    })
}

// 设备发放
export function equipmentGrant(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectGrantRecord/grantMd`,
        method: 'post',
        data
    })
}

// 设备收回
export function equipmentRecovery(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectGrantRecord/takeBackMd`,
        method: 'post',
        data
    })
}

// 设备退场
export function equipmentExit(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectGrantRecord/exit`,
        method: 'post',
        data
    })
}

// 设备检定
export function equipmentVerification(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/appraisalMdProjectInfo`,
        method: 'post',
        data
    })
}

// 导出
export function exportFile(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/exportMdProjectInfo`,
        method: 'post',
        data,
        responseType: 'blob'
    })
}

// 生成项目设备序列号
export function generateMdCode(params) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectInfo/generateMdCode`,
        method: 'get',
        params
    })
}

// 获取审批通过的所属配置计划
export function queryConfigProjectChoosePage(data) {
    return request({
        url: `${faceProducerApiUrl}/configProject/queryConfigProjectChoosePage`,
        method: 'post',
        data
    })
}
// 获取使用记录
export function getuseList(data) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectGrantRecord/useRecordPage`,
        method: 'post',
        data
    })
}

// 获取领用人信息
export function queryReceiverInfo(params) {
    return request({
        url: `${faceProducerApiUrl}/mdProjectGrantRecord/queryReceiverInfo`,
        method: 'get',
        params
    })
}